package com.linktco.common.utils.excel.test;

import com.linktco.common.utils.excel.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 测试嵌套导出实体
 * @author ren
 * @description
 * @date 2021年12月12日 15:03:13
 */
@Excel(name = "学生基本信息",sheetPwd = "1655658911",waterText ="My Learn",waterColor = "#ff00ff")
@Data
public class Student {

    @Excel(name="学号",sort = 1)
    private String sno;

    @Excel(name = "姓名" ,sort = 2)
    @ApiModelProperty(name = "姓名")
    private String name;

    @Excel(name = "学位(年级)",combo = {"一年级","二年级","三年级"},sort = 3)
    private String education;

    @Excel(name = "性别",sort = 4,keyValueExp = {"0:男","1:女"})
    private Integer sex;


    @Excel(name = "时间", dateFormat ={"yyyy-MM-dd HH:mm:ss"},width = 30, sort = 5)
    private LocalDateTime examTime;

    @Excel(name = "年龄", width = 20, sort = 6)
    private Integer age;



/***************************创建复杂标题方式1使用对象属性*******************************/

   // @Excel(name = "学科信息", hasChildren = true, sort = 5)
   // private Subject subject;


//    @Excel(name = "学科信息", hasChildrenList = true, sort = 5)
//    private List<Subject> subjectList;







/*******************************简单方式创建复杂标题方式2使用^方式*********************************/

//    @Excel(name = "学科信息^科目", sort = 5,width = 25)
//    private String subjectName;
//
//    @Excel(name = "学科信息^分数", sort = 6,width = 25)
//    private String score;
//
//    @Excel(name = "学科信息^考试时间", dateFormat = "yyyy-MM-dd HH:mm:ss", width = 30, sort = 7)
//    private Date examTime;
//
//    @Excel(name = "学科信息^章节^第一章", sort = 8,width = 25)
//    private String firstChapter;
//
//    @Excel(name = "学科信息^章节^第二章", sort = 9,width = 25)
//    private String secondChapter;

}
